<?php
// +----------------------------------------------------------------------
// | ThinkCMF [ WE CAN DO IT MORE SIMPLE ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013-2014 http://www.thinkcmf.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: Dean <zxxjjforever@163.com>
// +----------------------------------------------------------------------

namespace Appapi\Controller;
use Common\Controller\HomebaseController;
/**
 * 支付回调
 */
class PayController extends HomebaseController {

	 public function index(){
	     $config_pri=M('config_private')->where('id=1')->find();
         $version='1.0';
         $customerid=$config_pri['wx_mchid'];
         $userkey =$config_pri['wx_key'];
         $sdorderno=$_GET['orderid'];
         $total_fee=number_format($_GET['total_fee'],2,'.','');
         $paytype=$_GET['paytype'];
         //var_dump($paytype);exit;
        // $bankcode=$_POST['bankcode'];
         $notifyurl='http://canggongge.com/index.php/appapi/notify/index';
         $returnurl='';
         $remark='';
         $get_code=0;

         $sign=md5('version='.$version.'&customerid='.$customerid.'&total_fee='.$total_fee.'&sdorderno='.$sdorderno.'&notifyurl='.$notifyurl.'&returnurl='.$returnurl.'&'.$userkey);

            $this->assign("version",$version);
            $this->assign("customerid",$customerid);
            $this->assign("sdorderno",$sdorderno);
            $this->assign("total_fee",$total_fee);
            $this->assign("paytype",$paytype);
            $this->assign("notifyurl",$notifyurl);
            $this->assign("returnurl",$returnurl);
            $this->assign("remark",$remark);
            $this->assign("sign",$sign);
            $this->assign("get_code",$get_code);
            $this->display();
     }

}


